package com.hz.ruoyiequipment.equipment.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

/**
 * @Author: xqd
 * @CreateDate: 2025/03/14/16:44
 * @Description:
 */
@Configuration
public class ExecutorConfig {
    @Bean
    public ScheduledExecutorService scheduledExecutorService() {
        // 创建一个线程池大小为 5 的 ScheduledExecutorService
        return Executors.newScheduledThreadPool(5);
    }
}
